﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Text;

namespace TheCell
{
    public class FileUtils
    {
        public static void Save(string fileFullPath, string content)
        {
            if (File.Exists(fileFullPath))
            {
                File.Delete(fileFullPath);
            }

            using (FileStream fs = File.Create(fileFullPath))//*using
            {
                using (StreamWriter sw = new StreamWriter(fs))
                {
                    sw.Write(content);
                    sw.Close();
                }

                fs.Close();
            }
        }

        public static string Load(string fileFullPath)
        {
            return File.ReadAllText(fileFullPath);
        }
    }
}
